package com.cos.utils;

import com.alibaba.fastjson.JSON;



public class JsonUtils {
    //转json
    public static String toJson(Object obj){

        return JSON.toJSONString(obj);
    }

    //json转list对象集合
    public static <T> T toList(String o, Class<T> tClass){
        return JSON.parseObject(o,tClass);
    }

}
